package com.sleepfish.activiti.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Set;

import com.sleepfish.activiti.util.JsonLongSetTypeHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * <p>
 * Bpm 任务规则表
 * </p>
 *
 * @author xiaochao
 * @since 2022-03-13
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@Builder
@TableName(value = "bpm_task_assign_rule",autoResultMap = true)
@ApiModel(value="BpmTaskAssignRule对象", description="Bpm 任务规则表")
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
public class BpmTaskAssignRule extends BaseDO {
    /**
     * {@link #processDefinitionId} 空串，用于标识属于流程模型，而不属于流程定义
     */
    public static final String PROCESS_DEFINITION_ID_NULL = "";



    @ApiModelProperty(value = "编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "流程模型的编号")
    @TableField("model_id")
    private String modelId;

    @ApiModelProperty(value = "流程定义的编号")
    @TableField("process_definition_id")
    private String processDefinitionId;

    @ApiModelProperty(value = "流程任务定义的 key")
    @TableField("task_definition_key")
    private String taskDefinitionKey;

    @ApiModelProperty(value = "规则类型")
    private Integer type;

    @ApiModelProperty(value = "规则值，JSON 数组")
    @TableField(value = "options",typeHandler = JsonLongSetTypeHandler.class)
    private Set<Long> options;




}
